home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 356 / defs / mathlib1.def < prev    next >
Text File  |  1992-03-11  |  4KB  |  175 lines

  1. DEFINITION MODULE MathLib1;
  2. (*        File :    MathLib1.def                       *)
  3. (*        Date:   Octeber , 1986                       *)
  4. (*        By:  RTA                           *)
  5. (*                                       *)
  6. (*   SCCSID  = "%R%.%L%    %G%";                        *)
  7. (*
  8. *    Copyright (c) 1985, 1986 by
  9. *    Djavaheri Bros., Foster City, California.
  10. *    All Rights Reserved.
  11. *
  12. *    This software is furnished under a license and may be used and copied
  13. *    only  in accordance with  the  terms  of  such  license and  with the
  14. *    inclusion of the above copyright notice.  This software or  any other
  15. *    copies thereof may not be provided or otherwise made available to any
  16. *    other  person.   No title to and ownership of the  software is  herby
  17. *    transferred.
  18. *
  19. *    The information in this software is  subject to change without notice
  20. *    and  should  not be construed as a commitment by Djavaheri Bros.   No
  21. *    warranty is implied or expressed.
  22. *)
  23. (*                                       *)
  24. (*    History of Modifcation                           *)
  25. (*    Date        Who            Reasone               *)
  26.  
  27. IMPORT MathLib;
  28. EXPORT QUALIFIED
  29.     pi,       e,        zero,
  30.     sqrt,     power,    exp,      ln,       lg,       ld,      log,
  31.     sin,      cos,      tan,      csc,      sec,      cot,
  32.     arcsin,   arccos,   arctan,   arccsc,   arcsec,   arccot,
  33.     sinh,     cosh,     tanh,     csch,     sech,     coth,
  34.     arcsinh,  arccosh,  arctanh,  arccsch,  arcsech,  arccoth,
  35.         real,     int,      entier,   frac,     fix,      sgn ;
  36.  
  37.  
  38. VAR
  39.     pi, e,zero :REAL;
  40.  
  41.  
  42. PROCEDURE sqrt (x: REAL): REAL;
  43. (* x >= 0
  44. *)
  45.  
  46. PROCEDURE power (x,y: REAL): REAL;
  47. (* x to the power of y.
  48.    x >= 0
  49. *)
  50.   
  51. PROCEDURE exp (x: REAL): REAL;
  52. (* e to the power of x.
  53.    x <= 88
  54. *)
  55.  
  56. PROCEDURE ln (x: REAL): REAL;
  57. (* natural logarithm of x base e.
  58.    x >= 0
  59. *)
  60.  
  61. PROCEDURE lg (x: REAL): REAL;
  62. (* decimal logarithm of x base 10.
  63.    x >= 0
  64. *)
  65.  
  66. PROCEDURE ld (x: REAL): REAL;
  67. (* dual logarithm of x base 2.
  68.    x >= 0
  69. *)
  70.  
  71. PROCEDURE log (x,y: REAL):REAL;
  72. (* logarithm of x base y.
  73.    x >= 0
  74. *)
  75.  
  76. PROCEDURE sin (x: REAL):REAL;
  77.  
  78. PROCEDURE cos (x: REAL): REAL;
  79.  
  80. PROCEDURE tan (x: REAL): REAL;
  81. (*
  82.    x <> (2.0 * k +1.0)  (pi /2.0)
  83. *)
  84.  
  85. PROCEDURE csc (x: REAL): REAL;
  86. (*
  87.    x <> k * pi
  88. *)
  89.  
  90. PROCEDURE sec (x: REAL): REAL;
  91. (*
  92.    x <> (2.0 * k +1.0)  (pi /2.0)
  93. *)
  94.  
  95. PROCEDURE cot (x: REAL): REAL;
  96. (*
  97.    x <> k * pi
  98. *)
  99.  
  100. PROCEDURE arcsin (x: REAL): REAL;
  101.  
  102. PROCEDURE arccos (x: REAL): REAL;
  103.  
  104. PROCEDURE arctan (x: REAL): REAL;
  105.  
  106. PROCEDURE arccsc (x: REAL): REAL;
  107. (* x <> 0.0 *)
  108.  
  109. PROCEDURE arcsec (x: REAL): REAL;
  110. (* x <> 0.0 *)
  111.  
  112. PROCEDURE arccot (x: REAL): REAL;
  113.  
  114. PROCEDURE sinh (x: REAL): REAL;
  115.  
  116. PROCEDURE cosh (x: REAL): REAL;
  117.  
  118. PROCEDURE tanh (x: REAL): REAL;
  119.  
  120. PROCEDURE csch (x: REAL): REAL;
  121.  
  122. PROCEDURE sech (x: REAL): REAL;
  123.  
  124. PROCEDURE coth (x: REAL): REAL;
  125.  
  126. PROCEDURE arcsinh (x: REAL): REAL;
  127.  
  128. PROCEDURE arccosh (x: REAL): REAL;
  129. (* x >= 1.0 *)
  130.  
  131. PROCEDURE arctanh (x: REAL): REAL;
  132. (* ABS(x) < 1.0 *)
  133.  
  134. PROCEDURE arccsch (x: REAL): REAL;
  135. (* x <> 0 *)
  136.  
  137. PROCEDURE arcsech (x: REAL): REAL;
  138. (* 0.0 < x <= 1.0 *)
  139.  
  140. PROCEDURE arccoth (x: REAL): REAL;
  141. (* ABS(x) < 1.0 *)
  142.  
  143. PROCEDURE real (x: INTEGER): REAL;
  144. (* convert x: INTEGER to x: REAL *)
  145.  
  146. PROCEDURE int (x: REAL): REAL;
  147. (* truncate the fraction part of x.
  148.    -2147483647.0 <= x <= +2147483647.0
  149. *)
  150.  
  151. PROCEDURE entier (x: REAL): INTEGER;
  152. (* return the largest integer that is less
  153.    than or equal to x.
  154.    -2147483647.0 <= x <= +2147483647.0
  155. *)
  156.    
  157. PROCEDURE frac (x: REAL): REAL;
  158. (* truncate the fraction part off.
  159.    -2147483647.0 <= x <= +2147483647.0
  160. *)
  161.  
  162. PROCEDURE fix (x: REAL; y: INTEGER): REAL;
  163. (* keep only y digits past the decimal point.
  164.    -2147483647.0 <= x <= +2147483647.0
  165. *)
  166.  
  167. PROCEDURE sgn (x: REAL): REAL;
  168. (* return
  169.     -1.0: x < 0.0
  170.      0.0: x = 0.0
  171.          1.0: x > 0.0
  172. *)
  173.  
  174. END MathLib1.
  175.